package com.ybxx.core.dao;

import com.ybxx.core.command.QueryFilter;
import com.ybxx.core.web.paging.PagingBean;
import java.io.Serializable;
import java.util.Collection;
import java.util.List;

/**
 * 功能：DAO行为声明接口
 * 公司：XA.Co.LTD
 * 制作人：Tom.Y
 * 日期：2011-05*/
public abstract interface GenericDao<T, PK extends Serializable>
{
  public abstract T save(T paramT);

  public abstract T merge(T paramT);

  public abstract T get(PK paramPK);

  public abstract void remove(PK paramPK);

  public abstract void remove(T paramT);
  public void removeAll(Collection<T> entities);

  public abstract void evict(T paramT);

  public abstract List<T> getAll();

  public abstract List<T> getAll(PagingBean paramPagingBean);

  public abstract List<T> getAll(QueryFilter paramQueryFilter);

  public abstract List<T> findByHql(String paramString, Object[] paramArrayOfObject);

  public abstract List<T> findByHql(String paramString, Object[] paramArrayOfObject, PagingBean paramPagingBean);

  public abstract List<T> findByHql(String paramString, Object[] paramArrayOfObject, int paramInt1, int paramInt2);
  public int findCountByHql(String hql, Object[] objs);
  public List<T> findByHqlWithoutCount(String hql, Object[] objs, PagingBean pb);
  public Long getTotalItems(String queryString, final Object[] values);
  public Object findUnique(final String hql, final Object[] values);
  public abstract void flush();
}